using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RBAC.Domain.SalesManage
{
    /// <summary>
    /// 开票通知单
    /// </summary>
    [Table("BillingAccounting")]
    public class BillingAccounting : BaseEntity
    {
        /// <summary>
        /// 单据编号
        /// </summary>
        [StringLength(50)]
        public string? BillNumber { get; set; }

        /// <summary>
        /// 业务类型
        /// </summary>
        [StringLength(50)]
        public string? BusinessType { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [StringLength(100)]
        public string? CustomerName { get; set; }

        /// <summary>
        /// 开户行
        /// </summary>
        [StringLength(100)]
        public string? BankName { get; set; }

        /// <summary>
        /// 交付邮箱
        /// </summary>
        [StringLength(100)]
        public string? DeliveryEmail { get; set; }

        /// <summary>
        /// 单据日期
        /// </summary>
        public DateTime? BillDate { get; set; }

        /// <summary>
        /// 操作员
        /// </summary>
        [StringLength(50)]
        public string? Operator { get; set; }

        /// <summary>
        /// 蓝单红字
        /// </summary>
        [StringLength(20)]
        public string? InvoiceType { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        [StringLength(50)]
        public string? ProductCode { get; set; }

        /// <summary>
        /// 红字原因
        /// </summary>
        public string? RedReason { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        [StringLength(500)]
        public string? Remarks { get; set; }

        /// <summary>
        /// 单据状态（使用中文状态名：开立、审核、退回）
        /// </summary>
        [StringLength(20)]
        public string? BillStatus { get; set; }

        /// <summary>
        /// 审批员
        /// </summary>
        [StringLength(50)]
        public string? Reviewer { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public decimal? TaxRate { get; set; }

        /// <summary>
        /// 税号
        /// </summary>
        [StringLength(50)]
        public string? TaxId { get; set; }

        /// <summary>
        /// 业务状态
        /// </summary>
        [StringLength(20)]
        public string? BusinessStatus { get; set; }

        /// <summary>
        /// 审批日期
        /// </summary>
        public DateTime? ReviewDate { get; set; }

        /// <summary>
        /// 发票类型
        /// </summary>
        [StringLength(50)]
        public string? InvoiceCategory { get; set; }

        /// <summary>
        /// 地址电话
        /// </summary>
        [StringLength(200)]
        public string? AddressPhone { get; set; }

        /// <summary>
        /// 审批状态（0=开立，1=审核，2=退回）
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 关联的开单物料信息集合
        /// </summary>
        public virtual ICollection<BillingMaterials>? BillingMaterials { get; set; }
    }
}
